package leetcode;

/**
 * 【LeetCode题号: 58. 最后一个单词的长度】
 * https://leetcode-cn.com/problems/length-of-last-word/
 */
public class LengthOfLastWord {
    public int lengthOfLastWord(String s) {
        String[] strings = s.split(" ");
        String sLast = strings[strings.length - 1];
        return sLast.length();

    }
}
